package com.gzgy.ustore.api.web.controller.webservice;

import com.gzgy.ustore.api.service.AdvertService;
import com.gzgy.ustore.api.util.ResultUtil;
import com.gzgy.ustore.api.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by yimi on 2017/7/3.
 */
@Controller
public class AdvertController extends BaseController {


    @Autowired
    private AdvertService advertService;

    @RequestMapping(value = "advertList")
    public String advertList(ModelMap modelMap) {

        modelMap.put("message", ResultUtil.getResultJson(advertService.advertList()));

        return SHOW_JSON_NAME;
    }


}
